﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using Shoozla.ViewModel;
using Shoozla.DataModel;
using MahApps.Metro.Controls;

namespace Shoozla.View
{

    public partial class ID3TagEditorView : MetroWindow
    {
        public ID3TagEditorView() : base()
        {
            InitializeComponent();
            var viewmodel = new ID3TagEditorViewModel(this,App.MainView);
            DataContext = viewmodel;
            viewmodel.RequestClose += (s, e) => this.Close();
            viewmodel.Media = audio;
        }

        public void SelectedSongChanged(Mp3File song)
        {
            if (song != null)
            {
                ((ID3TagEditorViewModel)DataContext).Song = song;
                AppModel.CurrentEditingSong = song;
            }
        }
   
    }
}
